# $Id: Makefile 1244 2007-10-06 07:53:04Z sergei $

PREFIX = /usr/local
TKABBERDIR = $(PREFIX)/share/tkabbur
DOCDIR = $(PREFIX)/share/doc/tkabbur
BINDIR = $(PREFIX)/bin

SUBDIRS = emoticons \
	  ifacetk   \
	  jabberlib \
	  mclistbox \
	  msgs      \
	  pixmaps   \
	  plugins   \
	  sounds    \
	  tclxml    \
	  trans

install: install-bin

install-bin:
	mkdir -p $(DESTDIR)/$(TKABBERDIR)
	cp -r *.tcl $(SUBDIRS) $(DESTDIR)/$(TKABBERDIR)
	mkdir -p $(DESTDIR)/$(BINDIR)
	echo -e "#!/bin/sh\nexec wish $(TKABBERDIR)/tkabbur.tcl -name tkabbur \"\$$@\"\n" \
		>$(DESTDIR)/$(BINDIR)/tkabbur
	chmod 755 $(DESTDIR)/$(BINDIR)/tkabbur

.PHONY: install install-bin
